home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 900 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  40 lines

  1. Newsgroups: comp.lang.c
  2. Path: cirrus.seas.ucla.edu!orachat
  3. From: orachat@cirrus.seas.ucla.edu (Orachat Chieu)
  4. Subject: question about tcsetpgrp()
  5. Sender: news@seas.ucla.edu (News Daemon)
  6. Message-ID: <DKxxCM.BIH@seas.ucla.edu>
  7. Date: Wed, 10 Jan 1996 00:57:58 GMT
  8. X-Nntp-Posting-Host: cirrus.seas.ucla.edu
  9. Organization: School of Engineering and Applied Sciences, UCLA
  10.  
  11. Hi:
  12.  
  13. I'm using Solaris 2.3.  My program does the following.  
  14.  
  15. The parent and the child processes have the same pseudo terminal as the 
  16. controlling terminal.  The parent is the session leader. The parent
  17. has both the master and slave sides of the pty open.  The child only has
  18. the slave side open.  The parent and the child is in different process groups.
  19.  
  20. The parent can put the child's process group into the foreground 
  21. process group successfully by using the following code:
  22.  
  23.      tcsetpgrp (slavepty, child_process_group);
  24.  
  25. When the child process has stopped, the parent trys to put the 
  26. child's process group into the background process group by  
  27.  
  28.      tcsetpgrp (slavepty, parent_process_group);
  29.  
  30. but the system call fails with I/O error, EIO.
  31.  
  32. I would like to know what I need to do to put the child's process group
  33. into the background process group.
  34.  
  35. Any help or hint would be appreciated. Thank you very much.
  36.  
  37. If you need a short sample code, I will write up one. 
  38.  
  39.     Orachat Chieu
  40.